
cc.Class({
    extends: cc.Component,
    name: "RankingView",
    properties: {
        rankingScrollView: cc.Sprite,//显示排行榜,
        ListAllScrollView:cc.Node,
        RankingAllView:cc.Node,
        ListcontentView:cc.Node,
        friendCloseBtn:cc.Button
    },


    onLoad () {

 
        if (CC_WECHATGAME) {
            // 发消息给子域
            console.log("好友排行榜")
            window.wx.postMessage({
                messageType: 1,
                MAIN_MENU_NUM: "x1"
            });
        } else {
            cc.log("获取好友排行榜数据。x1");
        }
    
    },

    start () {

    },

    worldListClick:function(){

        console.log("第二的世界")
        this.RankingAllView.active=false
        this.ListAllScrollView.active=true
        this.ListcontentView.getComponent("ListScrollView").init()
       
     },
 
     friendListClick:function(){
        console.log("好友")
     },

     closeClick:function(){

        console.log("关闭好友排行榜")
   
        var changebig = cc.scaleTo(0.02,1.2);

        var finish = cc.callFunc(function(){
    
            var that=this
          var changesmail = cc.scaleTo(0.08,1.0);

          var smaillfinish=cc.callFunc(function(){

            that.RankingAllView.active=false

          })

          var seq2 = cc.sequence(changesmail,smaillfinish)
          this.friendCloseBtn.node.runAction(seq2)
       

       }, this);
    
       var seq = cc.sequence(changebig,finish)

       this.friendCloseBtn.node.runAction(seq)

        
      }

    
});
